local timer_id = os.startTimer(0.5)
local event, id
repeat
    event, id = os.pullEvent("timer")
    print("Timer with ID " .. id .. " was fired")
    timer_id = os.startTimer(0.5)
until false